package com.education.user.service;


import com.education.common.utils.DateUtils;
import com.education.user.mapper.InformationMapper;
import com.education.user.pojo.SysInformation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InformationService {

    @Autowired
    private InformationMapper informationMapper;

    public List<SysInformation> selectAll(){
        return informationMapper.selectAll();
    }

    public List<SysInformation> selectSysInformationList(SysInformation information) {
        SysInformation sysInformation = new SysInformation();
        sysInformation.setSchoolId(information.getSchoolId());
        List<SysInformation> select = informationMapper.select(sysInformation);
        return select;
    }

    public int insertSysInformation(SysInformation information) {
        information.setCreateTime(DateUtils.FdateTime());
        return informationMapper.insert(information);
    }

    public int updateSysInformation(SysInformation information) {
        return informationMapper.updateByPrimaryKeySelective(information);
    }

    public int deleteSysInformationByIds(Integer ids) {
        return informationMapper.deleteByPrimaryKey(ids);
    }


}
